<template>
  <div style="flex: 1">
    <van-tree-select :items="items" :main-active-index.sync="active">
      <template #content>
        <van-grid :column-num="3">
          <van-grid-item
            v-for="(value, index) in dataList[active]"
            :key="index"
            icon="photo-o"
            text="分类"
          />
        </van-grid>
      </template>
    </van-tree-select>
  </div>
</template>

<script>
export default {
  name: "Category",
  data() {
    return {
      active: 0,
      items: [{ text: "分组 1" }, { text: "分组 2" }],
      dataList: [
        [{},{},{},{},{}],
        [{},{},{},{},{},{},{},{},{}],
      ]
    };
  },
};
</script>

<style scoped>
.van-tree-select {
  height: calc(100vh - 50px) !important;
}
</style>